package com.owner.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.owner.biz.PremissionRoleBiz;
import com.owner.entity.PremissionRole;

@Controller
public class IndexContoller {
	@Autowired
	private PremissionRoleBiz premissionRoleBiz;
	
	@RequestMapping("showIndex")
	public String index(Model model){
		PremissionRole premissionRole1=premissionRoleBiz.checkBox(1);
		PremissionRole premissionRole2=premissionRoleBiz.checkBox(2);
		PremissionRole premissionRole3=premissionRoleBiz.checkBox(3);
		PremissionRole premissionRole4=premissionRoleBiz.checkBox(4);
		PremissionRole premissionRole5=premissionRoleBiz.checkBox(5);
		PremissionRole premissionRole6=premissionRoleBiz.checkBox(6);
		PremissionRole premissionRole7=premissionRoleBiz.checkBox(7);
		model.addAttribute("premissionRole1",premissionRole1);
		model.addAttribute("premissionRole2",premissionRole2);
		model.addAttribute("premissionRole3",premissionRole3);
		model.addAttribute("premissionRole4",premissionRole4);
		model.addAttribute("premissionRole5",premissionRole5);
		model.addAttribute("premissionRole6",premissionRole6);
		model.addAttribute("premissionRole7",premissionRole7);
		return "index";
	}
}
